﻿using System;
using System.ComponentModel;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;

namespace PIT.Labs.ProjectRepository.OntologyFeature.OntologyUploader
{
    /// <summary>
    /// <see cref="WebPart"/> that loads an ontology into a specific sharepoint store and makes it available for further processes like the <see cref="TaxonomyCreator"/>
    /// </summary>
    [ToolboxItemAttribute(false)]
    public class OntologyUploader : WebPart
    {
        // Visual Studio might automatically update this path when you change the Visual Web Part project item.
        private const string _ascxPath = @"~/_CONTROLTEMPLATES/RepositoryOntologies/OntologyUploader/OntologyUploadWebPartUserControl.ascx";

        /// <summary>
        /// 
        /// </summary>
        protected override void CreateChildControls()
        {
            Control control = Page.LoadControl(_ascxPath);
            Controls.Add(control);
        }
    }
}
